package com.blackto.lib.eventbus.abstraction;

import com.blackto.lib.eventbus.event.IntegrationEvent;

public interface IEventBus {
    void publish(IntegrationEvent event);

    <TEvent extends IntegrationEvent, THandler extends IIntegrationEventHandler<TEvent>>
    void subscribe(Class<TEvent> TEventType, Class<THandler> THandlerType);

    <TEvent extends IntegrationEvent, THandler extends IIntegrationEventHandler<TEvent>>
    void unsubscribe(Class<TEvent> TEventType, Class<THandler> THandlerType);
}
